﻿angular.module('umbraco.resources').factory('consultResource', function ($q, $http, umbRequestHelper) {
    /* 工厂对象返回 */
    return {
        /* 这里调用我们之前创建的ApiController */
        getConsultType: function () {
            return umbRequestHelper.resourcePromise($http.get("backoffice/MyOnlineConsult/ConsultEnding/GetConsultType")
                , "Failed to retrieve all Person data");
        },

        /* 查询咨询内容 */
        getConsults: function (i, k) {
            return umbRequestHelper.resourcePromise($http.post("backoffice/MyOnlineConsult/ConsultEnding/SearchConsult")
                , "Failed to retrieve all Person data");
        },

        deleteConsults: function (i) {
            return umbRequestHelper.resourcePromise($http.delete("backoffice/MyOnlineConsult/ConsultEnding/DeleteConsult/" + i)
                , "Failed to retrieve all Person data");
        },

        importConsults: function (i) {
            return umbRequestHelper.resourcePromise($http.put("backoffice/MyOnlineConsult/ConsultEnding/UpdateConsult/" + i)
                , "Failed to retrieve all Person data");
        }
    };
});